<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 变量
      var x;
      let y = 5;
      const PI = 3.14;
      console.log(x, y, PI);

      // 字符串
      let name = "如花";
      console.log(name);
      let empty_value = null;
      console.log(empty_value);

      // 条件判断
      let age = 9;
      if (age > 18) {
        console.log("成年了");
      } else {
        console.log("未成年");
      }

      // for 循环
      for (let i = 0; i < 5; i++) {
        console.log(i);
      }

      // while 循环
      let count = 10;
      while (count < 15) {
        count++;
        console.log(count);
      }
    </script>
  </body>
</html>
